package com.squirrel.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * Comment 评论
 * </p>
 *
 * @author 关远键
 * @since 2021/11/11 16:06
 */
@Data
@TableName("comment")
@ApiModel(value = "Comment对象", description = "")
public class Comment extends Model<Comment> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("评论id")
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("视频id")
    @TableField("video_id")
    private Integer videoId;

    @ApiModelProperty("评论内容")
    @TableField("comment_content")
    private String commentContent;

    @ApiModelProperty("评论时间")
    @TableField("comment_time")
    private LocalDateTime commentTime;

    @ApiModelProperty("父评论id（-1则代表该评论为第一条评论）")
    @TableField("comment_parent_id")
    private Integer commentParentId;


    @Override
    public Serializable pkVal() {
        return this.commentId;
    }

}
